package com.dengqi.mymodule.activity.permission;

import android.Manifest;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.dengqi.mymodule.R;

import androidx.annotation.Nullable;

public class TestPermissionActivity extends BasePermissionActivity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_permission_test);
    }


    public void onBtn1(View view) {
        String[] permissions = new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.CALL_PHONE, Manifest.permission.CAMERA};
        request(permissions, true);
    }


    public void onBtn2(View view) {
        requestCalendar();
    }

    @Override
    void grantSuccess() {
        Toast.makeText(this, "成功", Toast.LENGTH_SHORT).show();
    }

}

